package com.mxx.bu_yang.dialog;

import android.widget.EditText;

import com.mxx.bu_yang.R;

/**
 * 作者：刘江飞
 * 时间：2020/10/15  9:03
 * 邮箱：642371742Z@qq.com
 * 描述：转交
 **/
public class ModifyBarcodeDialog extends CancelSureDialog<String> {
    private EditText edt_barcode;

    /**
     * Sets layout id.
     *
     * @return the layout id
     */
    @Override
    protected int setLayoutId() {
        return R.layout.dialog_modify_barcode;
    }

    @Override
    protected void initView() {
        super.initView();
        edt_barcode = mRootView.findViewById(R.id.edt_barcode);
        String barcode = (String) getSerializableValue("barcode");
        edt_barcode.setText(barcode);
    }

    @Override
    protected void rightBtnSureClick() {
        String barcode = edt_barcode.getText().toString();
        if (barcode.isEmpty()) {
            return;
        }
        dismiss();

        mResultListener.result(barcode);
    }
}
